Skip to content

Instantly share code, notes, and snippets.

@karpathy
karpathy / microgpt.py
Last active September 27, 2026 23:02
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@WitherOrNot
WitherOrNot / tmogged.cmd
Last active September 27, 2026 22:51
i'm sorry dave
<# :
:: I wonder who made Task Manager...
@setlocal DisableDelayedExpansion
@echo off
echo "%*" | find /i "-el" >nul && set _elev=1
set _PSarg="""%~f0""" -el
@kibotu
kibotu / prompt-injections.md
Last active September 27, 2026 22:41
Prompt Injection & Jailbreak Techniques — Comprehensive Reference

Prompt Injection & Jailbreak Techniques — Comprehensive Reference

Purpose & scope. A defensive/educational knowledge base cataloguing known prompt-injection and jailbreak patterns, the models/systems they have affected, and the defenses against them. Compiled from primary literature (arXiv papers, vendor disclosures) and security research, June 2026.

How to read this. Every technique lists: how it works, an illustrative structural skeleton (the shape of the attack, not a weaponized payload), the models/systems it was reported against, and its current status. Examples are deliberately defanged. >

@Theldus
Theldus / README.md
Last active September 27, 2026 22:24
The only proper way to debug 16-bit (x86) code on Qemu+GDB

The only proper way to debug 16-bit code on Qemu+GDB

(or nearly so...)

GDB is undeniably an extremely versatile debugger, with the ability to add breakpoints, watchpoints, dump memory, registers, and the source code (along with its corresponding assembly). These features make it the perfect Swiss Army knife for most programmers. In addition to that, the possibility of implementing a 'GDB Stub' and automatically supporting GDB in your application makes it an almost universal debugger for a variety of tasks.

Qemu, like other virtual machines (such as 86Box), also implements debugging via GDB Stub, which enormously facilitates the development of bootloaders, operating systems, and more. The support for 32-bit and 64-bit code is quite good, and I have never seen any complaints about it. However, for 16-bit/real mode...

Is debugging in 16-bit/real mode really that bad?

If you have ever tried to debug 16-bit code on Qemu, you know how painful it can be:

  1. GDB thinks your code is
@2404715107
2404715107 / javdb-top250.md
Created January 19, 2026 05:26 — forked from jinjier/javdb-top250.md
JavDB top 250 movies list. [Updated on 2026/01]
@imSp4rky
imSp4rky / root-guide.md
Created September 21, 2026 15:43
Rooting the Xiaomi TV Box S 3rd Gen (MiTV-AFMU0 / "twilight")

Rooting the Xiaomi TV Box S 3rd Gen (MiTV-AFMU0 / "twilight")

Tested 2026-09-14 on build UKG3.250107.001 / V816.0.25.7.22.UZFAABX (Android TV 14, June 2025 patch). Result: Magisk 30.7 root, with Widevine L1 and PlayReady still working.

0. Know what you have

Item Value on this box How to check
Model MiTV-AFMU0 adb shell getprop ro.product.model
@Mooda-Tnt
Mooda-Tnt / vi-cheatsheet.md
Last active September 27, 2026 22:02
Vi Cheatsheet

Vi Cheatsheet

The following document is a collection of the vi commands I have learned. I update it every time I pick up something new along the way. Before you read the commands, you might want to consider the following notes:

  • When [] is used, it indicates that that part is optional.
  • You have to hit ENTER after commands that start with : for them to kick in.

Go to commands by category:

@TaurusOlson
TaurusOlson / statusline.vim
Last active September 27, 2026 22:01
My Vim statusline. Specificities: - Simple - Show the current function and the current Git branch (using taglist and fugitive)
set statusline =
" Buffer number
set statusline +=[%n]
" File description
set statusline +=%f\ %h%m%r%w
" Filetype
set statusline +=%y
" Name of the current function (needs taglist.vim)
set statusline +=\ [Fun(%{Tlist_Get_Tagname_By_Line()})]
" Name of the current branch (needs fugitive.vim)
@zusiwaldo123-design
zusiwaldo123-design / nexova.theme.css
Last active September 27, 2026 21:56
Discord Theme
/**
* @name Nexova
* @description Many Ajustments, and some stettings in beta (Only like 1 or 2 working).
* @author Lokidook
* @version 0.9.1
*/
@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@700&text=%E3%83%8D%E3%82%AF%E3%82%BD%E3%83%B4%E3%82%A1&display=swap");
@MasonRhodesDev
MasonRhodesDev / hyprland-screen-sharing-survival-guide.md
Created July 15, 2026 04:17
Hyprland screen sharing: xdph start-limit death, picker dialog spam, restore-token hijack — causes and fixes

Hyprland screen sharing: field notes on three recurring failures

Debugged 2026-07-14 on Arch + Hyprland (xdg-desktop-portal-hyprland-git, PipeWire 1.6.7). Three separate problems that compound into "screen sharing is randomly broken and the picker dialog is spam."

Failure 1: screen sharing silently dead for days

Symptom: No share dialog ever appears; Meet/Discord/OBS see no screens. busctl shows the portal exposes no ScreenCast interface at all: